<?php
class SiteController extends BaseSiteController
{
	public $layout='column1';
	public function actionIndex()
	{
		$this->render('index');
	}
	public function actionLogin()
	{
		$this->render('login');
	}
	public function actionPage()
	{
		$alias = Yii::app()->request->getParam('alias');
		$alias_attr  = (Yii::app()->language!=Yii::app()->params['language_default'])?"alias_".Yii::app()->language:"alias";
		$data = Pages::model()->find("$alias_attr=:p AND type='page' AND status=".FNews::STATUS_PUBLISHED,array(':p'=>$alias));
		$this->render('page',array('data'=>$data));
	}
}